Skip to content

Use idiomatic Effect parsing and timeouts#2674

Draft
cursor[bot] wants to merge 4 commits into
mainfrom
cursor/effect-codebase-idioms-62ee
Draft

Use idiomatic Effect parsing and timeouts#2674
cursor[bot] wants to merge 4 commits into
mainfrom
cursor/effect-codebase-idioms-62ee

Conversation

@cursor
Copy link
Copy Markdown
Contributor

@cursor cursor Bot commented May 13, 2026

What Changed

  • Converted the Tailscale integration errors to Schema.TaggedErrorClass and replaced millisecond timeout constants with Duration values.
  • Added a Tailscale timeout test using TestClock with the mocked ChildProcessSpawner.
  • Reworked Windows process diagnostics JSON handling to decode via Schema.fromJsonString and per-record Schema validation instead of JSON.parse and ad-hoc record probing.

Why

These are small, focused Effect idiom improvements that make error data serializable, timeout behavior testable, and JSON boundary parsing schema-driven while preserving current behavior.

UI Changes

Not applicable.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes
Open in Web View Automation 

Note

Replace millisecond number constants with Duration values and add schema-based Windows process parsing

  • Replaces numeric timeout constants with Duration values in both tailscale.ts and ProcessDiagnostics.ts, and updates all Effect.timeoutOption calls accordingly.
  • Adds a WindowsProcessRecord schema to ProcessDiagnostics.ts with decodeWindowsProcessJson/decodeWindowsProcessRecord helpers; parseWindowsProcessRows now uses schema decoding and is exported.
  • Converts TailscaleCommandError, TailscaleStatusParseError, and TailscaleUnavailableError from Data.TaggedError to Schema.TaggedErrorClass with typed field schemas.
  • Risk: probeTailscaleHttpsEndpoint callers must now pass timeout: Duration.Duration instead of timeoutMs: number; passing timeoutMs is silently ignored and the default timeout applies.

Macroscope summarized d6bbc5a.

cursoragent and others added 4 commits May 13, 2026 16:08
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant